#include <QCoreApplication>
#include <iostream>
#include <math.h>
using namespace std;
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    cout<< "Vvedite 3-h zna4noe 4islo"<<endl;
    int at,b,c,d;
    cin>>at;

    b=(at/100);
    c=(at-(b*100))/10;
    d=(at-b*100-c*10)/1;

cout<<d<<b<<c<<endl;
    return 0;
}
